from datetime import datetime
from applications.extensions import db


class ActionInfo(db.Model):
    __tablename__ = 'action_info'
    action_id = db.Column(db.Integer, primary_key=True, comment='动作id')
    course_id = db.Column(db.Integer, comment='课程id')
    action_name = db.Column(db.String(255), comment='动作名称')
    action_icon = db.Column(db.LargeBinary, comment='动作图标')
    action_description = db.Column(db.String(255), comment='动作描述')
    action_path = db.Column(db.String(255), comment='动作视频路径')
    action_length = db.Column(db.Integer, comment='动作视频长度(ms)')
    action_loadtime = db.Column(db.DateTime, default=datetime.now, comment='创建课程时间')
    action_updatetime = db.Column(db.DateTime, default=datetime.now, comment='更新课程时间')
    icon_path = db.Column(db.String(255), comment='动作封面路径')
    skeleton_path = db.Column(db.String(255), comment='动作骨架路径')
    del_flag = db.Column(db.Integer, comment='动作逻辑删除标志，0为未删除，1为删除')
